#!/usr/bin/env bun

import {
	decodeDouble,
	decodeFloat,
	decodeInt32,
	decodeInt64,
	decodeUint32,
	decodeUint64,
	decodeSint32,
	decodeSint64,
	decodeFixed32,
	decodeFixed64,
	decodeSfixed32,
	decodeSfixed64,
	decodeBool,
	decodeString,
	decodeBytes,
	def,
	BIN,
	decodeDoubleLi,
	decodeFloatLi,
	decodeInt32Li,
	decodeUint32Li,
	decodeInt64Li,
	decodeUint64Li,
	decodeSint32Li,
	decodeSint64Li,
	decodeFixed32Li,
	decodeSfixed32Li,
	decodeFixed64Li,
	decodeSfixed64Li,
	decodeBoolLi,
} from "../src/decode.js"

export const decodeTest1 = def([decodeInt32, decodeString], [0, ""])
export const decodeTest2 = def(
	[
		decodeDouble,
		decodeFloat,
		decodeInt32,
		decodeInt64,
		decodeUint32,
		decodeUint64,
		decodeSint32,
		decodeSint64,
		decodeFixed32,
		decodeFixed64,
		decodeSfixed32,
		decodeSfixed64,
		decodeBool,
		decodeString,
		decodeBytes,
		decodeDoubleLi, // 16
		decodeFloatLi, // 17
		decodeInt32Li, // 18
		decodeInt64Li, // 19
		decodeUint32Li, // 20
		decodeUint64Li, // 21
		decodeSint32Li, // 22
		decodeSint64Li, // 23
		decodeFixed32Li, // 24
		decodeFixed64Li, // 25
		decodeSfixed32Li, // 26
		decodeSfixed64Li, // 27
		decodeBoolLi, // 28
		decodeString, // 29 - repeated string is not packed
		decodeBytes, // 30 - repeated bytes is not packed
		decodeTest1,
		decodeTest1, // 32
	],
	[
		0.0,
		0.0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0n,
		0,
		0n,
		false,
		"",
		BIN,
		[], // 16
		[], // 17
		[], // 18
		[], // 19
		[], // 20
		[], // 21
		[], // 22
		[], // 23
		[], // 24
		[], // 25
		[], // 26
		[], // 27
		[], // 28
		[], // 29
		[], // 30
		decodeTest1(), // 31
		[], // 32
	],
	[29, 30, 32].map((i) => i - 1),
)
